package com.wn.Day10SpringMVC4;

import com.wn.entity.Student;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
@RequestMapping("/")
public class UserManager {
    @PostMapping("/user")
    public void addOne(Student user){
        System.out.println("UserManager.addOne"+user);
    }
    @GetMapping("user/{id}/{uid}")
    public UserManager findOne(@PathVariable("id") int id ,@PathVariable("uid") int uid){
        System.out.println("UserManager.findOne"+id+"------"+uid);
        return null;
    }
    @PutMapping("/user")
    public void updateOne(Student user) {
        System.out.println("UserManager.updateOne"+user);
    }

    @DeleteMapping("/user/{id}")
    public void deleteOne(@PathVariable int id){
        System.out.println("UserManager.deleteOne"+id);
    }

}
